import request from '@/utils/request'

export function getDateTheDay(today) {
  return request({
     url: `/date/view?today=${today}`,
     method: 'get',
  })
}

export function addDate(from) {
  return request({
    url: '/date/add',
    method: 'post',
    data: from,
  })
}

export function getDateAll() {
  return request({
    url: '/date/all',
    method: 'get',
  })
}

export function getDateByToday() {
  return request({
    url: '/date/today',
    method: 'get',
  })
}

export function getDateCount(id) {
  return request({
    url: '/date/count',
    method: 'get',
  })
}


export function addSituation(from) {
  return request({
    url: '/situation/calendar',
    method: 'post',
    data: from
  })
}

export function getSituationById(id) {
  return request({
    url: '/situation/calendar/' + id,
    method: 'get',
  })
}

export function updateSituation(data) {
  return request({
    url: '/situation/calendar',
    method: 'put',
    data: data
  })
}
